package com.wgts.wgts.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

/*
 *
 *
 *   data:2018/9/616:34
 *
 */public class MainViewPageAdapter extends FragmentStatePagerAdapter {

     private Fragment[] fragments;
    public MainViewPageAdapter(FragmentManager fm, Fragment[] fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int i) {
        return fragments[i];
    }

    @Override
    public int getCount() {
        return fragments.length;
    }
}
